<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>Linux Networking-concepts HOWTO: Different Services: Email, Web, FTP, Name Serving</TITLE>
 <LINK HREF="networking-concepts-HOWTO-7.html" REL=next>
 <LINK HREF="networking-concepts-HOWTO-5.html" REL=previous>
 <LINK HREF="networking-concepts-HOWTO.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="networking-concepts-HOWTO-7.html">Next</A>
<A HREF="networking-concepts-HOWTO-5.html">Previous</A>
<A HREF="networking-concepts-HOWTO.html#toc6">Contents</A>
<HR>
<H2><A NAME="s6">6.</A> <A HREF="networking-concepts-HOWTO.html#toc6">Different Services: Email, Web, FTP, Name Serving</A></H2>

<P>In the earlier example, we showed Netscape sending a TCP request to
a web server running on another node.  But imagine that the node with
the web server is also running an Email server, an FTP server and a
name server: how does it know which server the TCP connection is for?</P>
<P>
<A NAME="definition-port"></A> 
<A NAME="definition-destination-port"></A> </P>
<P>This is where TCP and UDP have a concept of `ports'.  Every packet
has space for a `destination port', which says what service the packet
is for.  For example, TCP port 25 is the mail server, and TCP port 80
is the web server (although sometimes you find web servers on
different ports).  A list of ports can be found in `/etc/services'.</P>

<P>Also, if two Netscape windows are both accessing different parts of
the same web site, how does the Linux box running Netscape sort out
the TCP packets coming back from the web server?</P>
<P>
<A NAME="definition-source-port"></A> </P>
<P>This is where the `source port' comes in: every new TCP connection
gets a different source port, so everyone can tell them apart, even if
they are going to the same destination IP address and the same
destination port.  Usually the first source port given will be 1024,
and will increase over time.</P>

<HR>
<A HREF="networking-concepts-HOWTO-7.html">Next</A>
<A HREF="networking-concepts-HOWTO-5.html">Previous</A>
<A HREF="networking-concepts-HOWTO.html#toc6">Contents</A>
</BODY>
</HTML>
